# -*- coding: utf-8 -*-
"""
    Created by huangyi at 2020/7/29.
    Description:
    Changelog: all notable changes to this file will be documented
"""
import math

from ....expression.context import Context
from ....expression.exception.invalid_exception import InvalidException
from ....expression.nonterminal.func.func import Func


class List(Func):
    
    def get_name(self) -> str:
        return "list"

    def calc(self, ctx: Context, *param):
        if not param:
            raise InvalidException("参数不能为空")
        return list(param)
